package com.mkyong.common.controller;
 
import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
 
@Controller
@RequestMapping("/welcome")
public class HelloController {
 
	@RequestMapping(method = {RequestMethod.GET,RequestMethod.POST})
	public @ResponseBody Map<String,String> printWelcome(@RequestParam(value="type",required=false) String type, ModelMap model) {
		Map<String,String> revenueData = new HashMap<String,String>();
		revenueData.put("Jan-2010", "$100,000,000");
		revenueData.put("Feb-2010", "$110,000,000");
		revenueData.put("Mar-2010", "$130,000,000");
		revenueData.put("Apr-2010", "$140,000,000");
		revenueData.put("May-2010", "$200,000,000");
/*		if("excel".equalsIgnoreCase(type)){
			return new ModelAndView("ExcelRevenueSummary","revenueData",revenueData);
			 
		}*/
		return revenueData;
 
	}
	
	
 
}